using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Helper;
namespace CoreData
{
    public class module_service
    {
            public long serviceid{get;set;}
            public long moduleid{get;set;}
         
        public module_service()
        {       
        }
        
       static module_service DynamicCast<T>(object row_data, object row_header) where T : module_service
       {
           // row_data : DataRow
           // row_header : DataColumnCollection
           module_service ret = new module_service();
           DataRow dt = (DataRow)row_data;

           foreach (DataColumn column in (DataColumnCollection)row_header)
           {
               switch (column.ColumnName)
               {
                      case  "serviceid":
                        ret.serviceid = ConvertObject.ToLong(dt[column]);
                       break;
                      case  "moduleid":
                        ret.moduleid = ConvertObject.ToLong(dt[column]);
                       break;
                
                   default:
                       break;
               }
           }

           return ret;
       }
        
    }
}
